﻿<%@ Page Language="C#" MasterPageFile="~/Masterpage/Sub_Full.master" AutoEventWireup="true" CodeFile="DangKyEmailNhanTin.aspx.cs" Inherits="Masterpage_Default" Title="Untitled Page" %>


<asp:Content ID="Content5" ContentPlaceHolderID="MainContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="MainContent1" Runat="Server">


    

<div class="newsbox_noleft">
   <div class="newsbox_noleft_header"> <h4>Đăng ký nhận email các bài rao vặt</h4></div>
   <div class="newsbox_noleft_content">
       <div align="center" class="">

    <table style="padding: 5px; width: 100%; height:50px;" >
        <tr>
            <td>
                Danh mục chính</td>
            <td colspan="2">
                <asp:DropDownList ID="dropDanhMucCha" runat="server" 
                    DataSourceID="SqlDataSource1" DataTextField="TenDanhMucChinh" 
                    DataValueField="MaDanhMucChinh" AutoPostBack="True" Width="200" Height="40">
                </asp:DropDownList>
                                                <asp:SqlDataSource ID="SqlDataSource1" 
                    runat="server" 
                    ConnectionString="<%$ ConnectionStrings:RAOVATConnectionString %>" 
                    SelectCommand="SELECT [TenDanhMucChinh], [MaDanhMucChinh] FROM [DANH_MUC_CHINH] WHERE ([Deleted] = @Deleted)">
                                                    <SelectParameters>
                                                        <asp:Parameter DefaultValue="false" Name="Deleted" Type="Boolean" />
                                                    </SelectParameters>
                </asp:SqlDataSource>
                                                </td>
        </tr>
        <tr>
            <td>
                Danh mục con</td>
            <td colspan="2">
                <asp:DropDownList ID="dropDanhMucCon" runat="server" 
                    DataSourceID="SqlDataSource2" DataTextField="TenDanhMucCon" 
                    DataValueField="MaDanhMucCon" Width="200" Height="40">
                </asp:DropDownList>
                                                <asp:SqlDataSource ID="SqlDataSource2" 
                    runat="server" 
                    ConnectionString="<%$ ConnectionStrings:RAOVATConnectionString %>" 
                    SelectCommand="SELECT [TenDanhMucCon], [MaDanhMucCon] FROM [DANH_MUC_CON] WHERE (([Deleted] = @Deleted) AND ([MaDanhMucChinh] = @MaDanhMucChinh))">
                                                    <SelectParameters>
                                                        <asp:Parameter DefaultValue="false" Name="Deleted" Type="Boolean" />
                                                        <asp:ControlParameter ControlID="dropDanhMucCha" DefaultValue="0" 
                                                            Name="MaDanhMucChinh" PropertyName="SelectedValue" Type="Int32" />
                                                    </SelectParameters>
                </asp:SqlDataSource>
                                                </td>
        </tr>
        <tr>
            <td>
                Email</td>
            <td>
                <asp:TextBox ID="TextBox1" runat="server" Width="200" Height="40"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="TextBox1" ErrorMessage="Sai định dạng Email" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="Gui" Text="*"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="TextBox1" ErrorMessage="Sai Định Dạng Email" 
                    ValidationGroup="Gui" Text="*">
                </asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnGui" runat="server" Text="Gửi" CssClass="exclusive" 
                    ValidationGroup="Gui" onclick="btnGui_Click" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
   
    </div>
    </div>
    </div>

</asp:Content>


